/*    */ package com.zimbra.cs.dav.service.method;
/*    */ 
/*    */ import com.zimbra.common.service.ServiceException;
/*    */ import com.zimbra.cs.dav.DavContext;
/*    */ import com.zimbra.cs.dav.DavException;
/*    */ import com.zimbra.cs.dav.resource.Collection;
/*    */ import com.zimbra.cs.dav.resource.MailItemResource;
/*    */ import com.zimbra.cs.dav.resource.Notebook;
/*    */ import java.io.IOException;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class Copy
/*    */   extends Move
/*    */ {
/*    */   public static final String COPY = "COPY";
/*    */   
/*    */   public String getName()
/*    */   {
/* 32 */     return "COPY";
/*    */   }
/*    */   
/*    */   public void handle(DavContext ctxt) throws DavException, IOException, ServiceException {
/* 36 */     String newName = null;
/* 37 */     if (((this.mir instanceof Collection)) || ((this.mir instanceof Notebook)))
/* 38 */       newName = ctxt.getNewName();
/* 39 */     if (ctxt.isOverwriteSet()) {
/* 40 */       this.mir.moveORcopyWithOverwrite(ctxt, this.col, newName, false);
/*    */     } else {
/* 42 */       this.mir.copy(ctxt, this.col, newName);
/*    */     }
/* 44 */     ctxt.setStatus(204);
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/dav/service/method/Copy.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */